package com.xli.mis.datasource.entity.dto;

import com.xli.dto.validation.group.IGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;


@Data
public class DataSourceDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 975905813870961187L;

    @Schema(description = "数据源类型")
    @NotBlank(message = "dsType不能为空", groups = {IGroup.add.class, IGroup.update.class})
    private String dsType;

    @Schema(description = "数据源名称")
    @NotBlank(message = "dsName不能为空", groups = {IGroup.add.class, IGroup.update.class})
    private String dsName;

    @Schema(description = "链接")
    @NotBlank(message = "url不能为空", groups = {IGroup.add.class, IGroup.update.class})
    private String url;

    @Schema(description = "用户名")
    @NotBlank(message = "user不能为空", groups = {IGroup.add.class, IGroup.update.class})
    private String user;

    @Schema(description = "密码")
    @NotBlank(message = "pwd不能为空", groups = {IGroup.add.class, IGroup.update.class})
    private String pwd;

    @Schema(description = "排序")
    private Integer orderNum;
}
